package cn.elead.chaos.shiro.jwt;

import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.credential.CredentialsMatcher;

import cn.hutool.core.util.StrUtil;

public class JWTCredentialsMatcher implements CredentialsMatcher {

	@Override
	public boolean doCredentialsMatch(AuthenticationToken authenticationToken, AuthenticationInfo authenticationInfo) {
		String token = (String) authenticationToken.getCredentials();
		if (StrUtil.isNotBlank(token)) {
			return true;
		}
		return false;
	}

}
